import { Badge } from "@mantine/core";

export default function StatusBadge({ status }) {
  switch (status) {
    case "CREATED":
      return (
        <Badge variant="light" color="yellow" size="sm">
          等待买家付款
        </Badge>
      );
    case "BUYER_PAID":
      return (
        <Badge variant="light" color="yellow" size="sm">
          等待经营店铺付款
        </Badge>
      );
    case "FIRST_SELLER_PAID":
      return (
        <Badge color="yellow" size="sm">
          等待管理店铺付款
        </Badge>
      );
    case "SECOND_SELLER_PAID":
      return (
        <Badge color="red" size="sm">
          等待发货
        </Badge>
      );
    case "DELIVERING":
      return (
        <Badge variant="light" color="teal" size="sm">
          运输中
        </Badge>
      );
    case "RECEIVED":
      return (
        <Badge variant="light" color="green" size="sm">
          已完成
        </Badge>
      );
    case "CANCELLED":
      return (
        <Badge variant="light" color="grey" size="sm">
          已取消
        </Badge>
      );
    default:
      return null;
  }
}
